<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Title</title>
    <style>
        .lookMe{
            text-align: center;
        }
        .lookMe>button{
            background-color: #36D;
            color:white;
            border:5px solid #36D;
            border-radius: 5px;
        }
    </style>
</head>
<body>
    <div class="lookMe">
        <button>点击我0次试试</button>
    </div>
</body>
<script>
    //dom通过标签名获取元素，返回的是一个数组
    let btn = document.getElementsByTagName('button')[0];
    //计数器
    let count = 0;
    //设置单击事件
    btn.onclick=()=>{ //箭头函数
        btn.innerHTML=`点击我${count++}次试试`
    }
</script>
</html>